package org.jc.auth.common.util;

import cn.dev33.satoken.secure.BCrypt;

/**
 * 功能描述
 *
 * @author wanghongqian
 * @date 2024/07/13 19:19
 */
public class PasswordEncoderUtil {

    public static String encode(String password){
        String salt = BCrypt.gensalt();
        String hashpw = BCrypt.hashpw(password, salt);
        return hashpw;
    }

    public static Boolean check(String password,String hashpw){
        return BCrypt.checkpw(password,hashpw);
    }
}
